.NET Framework Class Library |
BlockingCollection<(Of <(T>)>) Constructor (IProducerConsumerCollection<(Of <(T>)>), Int32) |
BlockingCollection<(Of <(T>)>) Class See Also Send Feedback |
Initializes a new instance of the BlockingCollection<(Of <(T>)>)
class with the specified upper-bound and using the provided
IProducerConsumerCollection<(Of <(T>)>) as its underlying data store.
Namespace:
System.Collections.Concurrent
Assembly:
System.Threading (in System.Threading.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Sub New ( _ collection As IProducerConsumerCollection(Of T), _ boundedCapacity As Integer _ ) |
C# |
---|
public BlockingCollection( IProducerConsumerCollection<T> collection, int boundedCapacity ) |
Parameters
- collection
- Type: System.Collections.Concurrent..::.IProducerConsumerCollection<(Of <(T>)>)
The collection to use as the underlying data store.
- boundedCapacity
- Type: System..::.Int32
The bounded size of the collection.
Exceptions
Exception | Condition |
---|---|
System..::.ArgumentNullException | The collection argument is null. |
System..::.ArgumentOutOfRangeException | The boundedCapacity is not a positive value. |
System..::.ArgumentException | The supplied collection contains more values than is permitted by boundedCapacity. |